<?php

namespace App\Http\Admin\Controllers\Order;


use App\Http\Admin\Services\Order\TaobaoOrderService;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;


class TaobaoOrderController extends Controller
{

    protected $service;

    public function __construct(TaobaoOrderService $taobaoOrderService)
    {
        $this->service = $taobaoOrderService;
    }


    public function index(){
        return view('order.taobao_order');
    }

    public function buyerPage(){
        return view('order.taobao_order_users');
    }

    public function liverPage(){
        return view('order.liver_busines');
    }

    public function list(Request $request){

        $attributes =   $request->all();

        $result =   $this->service->list($attributes);

        return res('ok',$result);

    }

    public function import(Request $request){
        $attributes =   $request->all();

        $result =   $this->service->import($attributes);

        return res('ok',$result);
    }

    public function export(Request $request){

        $attributes =   $request->all();

        $this->service->export($attributes);

    }

    /*
     * 用户订单信息统计
     * */
    public function buyerList(Request $request){

        $attributes =   $request->all();

        $result = $this->service->buyerList($attributes);

        return res('ok',$result);

    }


    /*
     * 用户数据导出
     *
     * */
    public function buyerExport(Request $request){

        $attributes =   $request->all();

        $result = $this->service->buyerExport($attributes);

        return res('ok',$result);

    }

    /*
     * 粉丝备注
     * */
    public function storeMark(Request $request){

        $attributes =   $request->all();

        $result = $this->service->storeMark($attributes);

        return res('ok',$result);

    }


    /*
     * 主播每日成交报表
     * */
    public function liverBusiness(Request $request){

        $attributes =   $request->all();

        $result = $this->service->liverBusiness($attributes);

        return res('ok',$result);

    }

    /*
     * 主播每日成交报表导出
     * */
    public function liverExport(Request $request){

        $attributes =   $request->all();

        $result = $this->service->liverExport($attributes);

        return res('ok',$result);

    }



}